package com.wanpinghui.supplier.business;

import android.content.Intent;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.wanpinghui.supplier.R;
import com.wanpinghui.supplier.common.BaseActivity;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;

/***
 * 功能描述:
 * 作者:qiujialiu
 * 时间:2018/1/30
 ***/
@ContentView(R.layout.layout_activity_comment)
public class CommentActivity extends BaseActivity {
    @ViewInject(R.id.tv_send)
    private TextView textViewSend;
    @ViewInject(R.id.iv_back)
    private ImageView imageViewBack;
    @ViewInject(R.id.edt_input)
    private EditText editTextInput;


    @Override
    public String getName() {
        return null;
    }

    @Override
    public boolean isBar() {
        return false;
    }

    @Override
    public void initViews() {

    }

    @Override
    public void bindEvents() {
        imageViewBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        textViewSend.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.putExtra("result", editTextInput.getText().toString());
                setResult(RESULT_OK, intent);
                finish();
            }
        });
    }

    @Override
    public void initData() {

    }
}
